fix: The number of intra subnets should not influence the number of NAT gateways provisioned #968
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
"The module does not take into account the number of intra_subnets, since the latter are designed to have no Internet access via NAT Gateway."
the concept is right, the number of intra subnets should not determine the number of nat gateways. However it currently does. Today I tried to create a vpc with :
3 intra subnets,
2 public subnets,
2 private subnets.
As a result, I had 3 nat gateways (because i choose configuration nat gateway per subnet) so i had:
nat-gateway-a located in public network A
nat-gateway-b located in public network B
nat-gateway-c located in public network A (second nat gateway in the same subnet).
Motivation and Context
makes the module work in accordance with the assumptions, documentation and logic. Keeping an unnecessary nat gateway with a public ip is just an extra cost, and 2 nat gateways in the same subnet can be confusing
Breaking Changes
No
How Has This Been Tested?
Yeap, on latest version 5.1.1 i removed line and everything works fine according to assumptions.